WRITE STRING

This command will write the specified string to the file.

  Syntax
WRITE STRING File Number, String
  Parameters
File Number
Integer
The file specified by the file number must be open or the command will fail
String
String
This command will write the specified string to the file. The string will be terminated in the file with the standard carriage return ASCII characters (13)+(10)

  Returns

This command does not return a value.

  Description

The string will be terminated in the file with the standard carriage return ASCII characters (13)+(10). The file specified by the file number must be open or the command will fail.

  Example Code
cls
open to write 1,"data.dat"
if file open(1)=1
write string 1,"hello"
endif
close file 1
wait 1000*8
open to read 1,"data.dat"
if file open(1)=1
read string 1,a$
print "string= ",a$
endif
close file 1
do
loop
end
  See also

FILE Commands Menu
Index